home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / lib / sc4.g < prev    next >
Encoding:
Text File  |  1996-04-04  |  5.1 KB  |  252 lines  |  [TEXT/XCNQ]

  1. (game-module "sc4"
  2.   ;; (should add a game size variant)
  3.   ;; (should add land/water ratio variants)
  4.   )
  5.  
  6. (unit-type tank (image-name "tank")
  7.   (help ""))
  8. (unit-type artillery (image-name "arty-1")
  9.   (help ""))
  10. (unit-type fighter (image-name "jets")
  11.   (help ""))
  12. (unit-type helicopter (image-name "helicopter")
  13.   (help ""))
  14. (unit-type transport (image-name "ap")
  15.   (help ""))
  16. (unit-type destroyer (image-name "dd")
  17.   (help ""))
  18. (unit-type submarine (image-name "sub")
  19.   (help ""))
  20. (unit-type carrier (image-name "cv")
  21.   (help ""))
  22. (unit-type battleship (image-name "bb")
  23.   (help ""))
  24. (unit-type bomber (image-name "4e")
  25.   (help ""))
  26. (unit-type city (image-name "city20")
  27.   (help ""))
  28.  
  29. (material-type fuel)
  30.  
  31. (terrain-type water (color "sky blue") (char ".")
  32.   )
  33. (terrain-type land (color "green") (char "+")
  34.   )
  35.  
  36. (define ground-types (tank artillery))
  37. (define air-types (fighter helicopter bomber))
  38. (define ship-types (transport destroyer submarine carrier battleship))
  39.  
  40. ;;; Static relationships.
  41.  
  42. (table vanishes-on
  43.   (ground-types water true)
  44.   (ship-types land true)
  45.   (city water true)
  46.   )
  47.  
  48. ;;; Unit-unit capacities.
  49.  
  50. (add transport capacity 6)
  51. (add carrier capacity 100)
  52. (add city capacity 100)
  53.  
  54. (table unit-size-as-occupant
  55.   (u* u* 200)
  56.   (ground-types transport 1)
  57.   (air-types carrier 1)
  58.   (u* city 1)
  59.   ;; Cities can't occupy each other.
  60.   (city city 200)
  61.   )
  62.  
  63. ;;; Unit-terrain capacity.
  64.  
  65. (add t* capacity 100)
  66.  
  67. (table unit-size-in-terrain
  68.   (u* t* 1)
  69.   ;; One ship per cell.
  70.   (ship-types water 100)
  71.   ;; Allow aircraft to pass over ships and towns.
  72.   (air-types t* 0)
  73.   ;; One city per cell.
  74.   (city t* 100)
  75.   )
  76.  
  77. ;;; Unit-material capacities.
  78.  
  79. (table unit-storage-x
  80.   (air-types fuel (20 20 30))
  81.   ;; Carriers and cities have effectively infinite storage.
  82.   ((city carrier) fuel 9999)
  83.   )
  84.  
  85. ;;; Vision.
  86.  
  87. (table see-chance-adjacent
  88.   ;; Submarines are always hard to see for ships to see.
  89.   (u* submarine 0)
  90.   ;; ...except destroyers.
  91.   (destroyer submarine 100) 
  92.   )
  93.  
  94. ;;; Actions.
  95.  
  96. (add ground-types acp-per-turn (2 1))
  97. (add air-types acp-per-turn (20 10 10))
  98. (add ship-types acp-per-turn 3)
  99. (add destroyer acp-per-turn 4)
  100.  
  101. (add city acp-per-turn 1)
  102.  
  103. ;;; Movement.
  104.  
  105. (add city speed 0)
  106.  
  107. (table mp-to-enter-terrain
  108.   (ground-types water 99)
  109.   (ship-types land 99)
  110.   )
  111.  
  112. (table mp-to-enter-unit
  113.   (u* u* 1)
  114.   ; Aircraft can't sortie again until next turn.
  115.   (air-types carrier (20 10 10))
  116.   (air-types city (20 10 10))
  117.   )
  118.  
  119. (add air-types free-mp (20 10 10))
  120.  
  121. (table consumption-per-move
  122.   (air-types fuel 1)
  123.   )
  124.  
  125. (table zoc-range
  126.   ;; Units only ever control their own cells.
  127.   (u* u* 0)
  128.   ;; Cities don't control the air overhead.
  129.   (city air-types -1)
  130.   )
  131.  
  132. ;;; Construction.
  133.  
  134. (add ground-types cp 4)
  135. (add air-types cp (6 8 20))
  136. (add ship-types cp (8 8 8 10 20))
  137.  
  138. (table acp-to-create
  139.   (city u* 1)
  140.   (city city 0)
  141.   )
  142.  
  143. (table acp-to-build
  144.   (city u* 1)
  145.   (city city 0)
  146.   )
  147.  
  148. ;;; Combat.
  149.  
  150. (add u* hp-max (2 1 1 2 3 4 3 12 18 1 1))
  151.  
  152. (table hit-chance
  153.   ;;                t   a   f   h   t   d   s   c   b   b   c
  154.   (tank       u* ( 50  50  50  50  50  50  50  50  50  50  50))
  155.   (artillery  u* ( 50  50  30  60  50  50  50  50  50  50  50))
  156.   (fighter    u* ( 20  20  60  70  20  20  20  20  20  70  20))
  157.   (helicopter u* ( 50  50  50  50  50  50  50  50  50  60  50))
  158.   (transport  u* ( 10  10  10  10  10  10  10  10  10  10  10))
  159.   (destroyer  u* ( 50  50  50  50  50  50  70  50  50  20  50))
  160.   (submarine  u* ( 10  10   0   0  50  50  50  50  50   0  50))
  161.   (carrier    u* ( 10  10  20  20  20  20  20  20  20  20  10))
  162.   (battleship u* ( 50  50  50  50  50  50  50  50  50  50  50))
  163.   (bomber     u* ( 50  50  50  50  50  50  50  50  50  50  50))
  164.   (city       u* ( 50  50  50  50  50  50  50  50  50  50  50))
  165.   )
  166.  
  167. (table damage
  168.   (u* u* 1)
  169.   ;; Armies don't damage cities.
  170.   (ground-types city 0)
  171.   ;; Submarines can be deadly.
  172.   (submarine ship-types 2d4+1)
  173.   )
  174.  
  175. (add artillery acp-to-fire 1)
  176. (add battleship acp-to-fire 1)
  177.  
  178. (add artillery range 3)
  179. (add battleship range 3)
  180.  
  181. (table capture-chance
  182.   (ground-types city  50)
  183.   )
  184.  
  185. (table hp-to-garrison
  186.   ;; Use up the capturing unit.
  187.   (ground-types city 1)
  188.   )
  189.  
  190. ;; (should add detonation for bombers)
  191.  
  192. ;;; Backdrop.
  193.  
  194. (table base-consumption
  195.   (air-types fuel (20 10 10))
  196.   )
  197.  
  198. (table base-production
  199.   ;; Our fuel sources can never run out.
  200.   ((carrier city) fuel 9999)
  201.   )
  202.  
  203. (table hp-per-starve
  204.   (air-types fuel 1.00)
  205.   )
  206.  
  207. (table auto-repair
  208.   ;; Cities repair 1 hp of damage each turn for each ship occupant.
  209.   (city ship-types 1.00)
  210.   )
  211.  
  212. ;;; Scoring.
  213.  
  214. (add u* point-value 0)
  215. (add city point-value 1)
  216.  
  217. (scorekeeper (do last-side-wins))
  218.  
  219. ;;; Random setup.
  220.  
  221. (add t* alt-percentile-min (0 70))
  222. (add t* alt-percentile-max (70 100))
  223. (add t* wet-percentile-min 0)
  224. (add t* wet-percentile-max 100)
  225.  
  226. (set alt-smoothing 4)
  227.  
  228. (set country-radius-min 3)
  229.  
  230. (set country-separation-min 15)
  231.  
  232. (add t* country-terrain-min (30 6))
  233.  
  234. (add city start-with 1)
  235. (add city independent-near-start 2)
  236.  
  237. (table favored-terrain
  238.   (city (water land) (0 100))
  239.   )
  240.  
  241. (table independent-density
  242.   (city land 200)
  243.   )
  244.  
  245. (table unit-initial-supply
  246.   (city fuel 9999)
  247.   )
  248.  
  249. (game-module (notes (
  250.   "This is not a perfect emulation of StratCon."
  251. )))
  252.